<template>
    <div class="search">
        <Card>
            <div>
                <iframe :src="this.url" frameborder="0" width="100%" :style="{height:calHeight}" scrolling="auto"></iframe>
            </div>
        </Card>
    </div>
</template>
<script>
    import {getCarKeyParameters} from '_p/afs-core-business/api/afs-case/loan-approve/loanAuditVin'
    export default {
        name: "loanAuditVin",
        props: {
            detailParams: {}
        },
        data() {
            return {
               // summaryVisible: false,
                url: '',
            }
        },
        computed : {
            calHeight(){
                return (window.innerHeight - 100) + 'px';
            }
        },
        methods: {
            summaryBtn(){
                console.log(this.detailParams,"loanAuditVin")
                var date = this.detailParams.lendingFirstDate.substring(0,18);
                date = this.detailParams.lendingFirstDate.replace(/-/g,'/');
                this.detailParams.loanDate = new Date(date).getTime();
                getCarKeyParameters(this.detailParams).then(res => {
                    if (res.code === '0000') {
                        if(res.data.code =="0"){
                            console.log(res.data.url)
                            this.url = res.data.url;
                        }else {
                            this.$Message.error('解释失败，请稍后处理')
                        }
                    }
                })
                    // this.summaryVisible = true;
            },
        }
    }
</script>

<style scoped>
    .search {
        height: 90%;
    }
</style>
